﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace IoTBrowser
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        public App()
        {
            this.Dispatcher.UnhandledException += Dispatcher_UnhandledException;
        }


        private void Dispatcher_UnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {
            MessageBox.Show("下载失败，请确认网络连接是否正常！", "提示", MessageBoxButton.OK, MessageBoxImage.Error);
            //Core.LogProvider.Default.Log(Infrastructure.Logging.LogLevel.Error, e.Exception, "运行失败");
            e.Handled = true;
        }

        void app_Startup(object sender, StartupEventArgs e)
        {
            // LoadingWindow        MainWindow    

            Window window = new LoadingWindow();

            // Open a window
            window.Show();
        }
    }
}
